#pragma once
#include<string>
#include<memory>
#include"RetData.h"
#include"SoftData.h"
#include"HardData.h"
#include"Header.h"

class Ret{
private:
  bool cork = true;
  void clearCork(int sockfd);
public:
  Ret(): head(std::make_shared<Header>()){}
  std::shared_ptr<Header> head;
  std::shared_ptr<RetData> body;
  std::string s;
  bool overHead = false;
  bool over = false;
  void send(int sockfd);
  void sendHead(int sockfd);
  void sendBody(int sockfd);
  void sendSoft(int sockfd, std::shared_ptr<SoftData> &&hd);
  void sendHard(int sockfd, std::shared_ptr<HardData> &&hd);
  const static int size = 4096;
};
